package networkTraining;

import java.util.Collections;
import java.util.Random;

public class RandomizedDataSetProvider implements IDataSetProvider
{
	private IDataSet trainingData;
	private IDataSet testingData;
	private Random random;

	public RandomizedDataSetProvider(IDataSet trainingData, IDataSet testingData, long randomSeed)
	{
		this.trainingData = trainingData;
		this.testingData = testingData;
		random = new Random(randomSeed);
	}

	@Override
	public IDataSet getTrainingData()
	{
		Collections.shuffle(trainingData.getDataRowList(), random);
		return trainingData;
	}

	@Override
	public IDataSet getTestingData()
	{
		//Collections.shuffle(testingData.getDataRowList(), random);
		return testingData;
	}

}
